home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / MISC / MAG01.ZIP / MAG01.TXT
Encoding:
Text File  |  1995-10-27  |  50.3 KB  |  1,049 lines

  1. Spellcaster presents:
  2.  
  3.  
  4. TTTTTTTTTT HH      HH EEEEEEEEEE    MM      MM    AAAA     GGGGGGGGG
  5.     TT     HH      HH EE            MMM    MMM   AA  AA   GG
  6.     TT     HH      HH EE            MM M  M MM  AA    AA  GG  
  7.     TT     HHHHHHHHHH EEEEEE        MM  MM  MM  AAAAAAAA  GG   
  8.     TT     HH      HH EE            MM      MM  AA    AA  GG    GGGG
  9.     TT     HH      HH EE            MM      MM  AA    AA  GG      GG
  10.     TT     HH      HH EEEEEEEEEE    MM      MM  AA    AA   GGGGGGGG
  11.  
  12.                                                         Issue 1
  13.                                                         25-9-95
  14.  
  15.  
  16.  
  17. ■ Index
  18.  
  19.         1. Introduction
  20.           1.1. About the magazine
  21.           1.2. About the author
  22.           1.3. Distribution
  23.           1.4. Contribuitions
  24.           1.5. Hellos and greets
  25.         2. Hexadecimal and binary - The untold story
  26.           2.1. What are they ?
  27.         3. Bits and bytes - To they really bite ?
  28.           3.1. What are they ?
  29.           3.2. The relatives
  30.         4. Introduction to Pascal
  31.           4.1. What is Pascal
  32.           4.2. The IDE
  33.           4.3. How to build a program in Pascal - Your first program
  34.           4.4. Variables
  35.           4.5. The Writeln and Readln keywords
  36.         5. Our friend, the pointer - Part I
  37.           5.1. What the hell is a pointer ?
  38.           5.2. What's the use ?
  39.           5.3. How can I use a pointer ?
  40.         6. Points of view
  41.         7. The adventures of Spellcaster, part 1.
  42.         
  43.  
  44. ■ Introduction
  45.  
  46.   ■ About the magazine
  47.  
  48.     Welcome to the first issue of 'The Mag', the electronic magazine, brought
  49.   to you by Spellcaster, alias Diogo de Andrade. Ok, ok, I know the magazine has
  50.   a crapy name, but it was the only thing I could think of.
  51.     This magazine is dedicated to all the programmers and would-be programmers
  52.   out there, to those who wish to learn how to program anything, from demos to
  53.   games, passing through utilities and all sort of thing your mind can think of.
  54.  
  55.     When you read this magazine, I'll assume some things. First, I assume you
  56.   have Borland's Turbo Pascal, version 6 and upwards. I'll also think you have
  57.   a 80386 (or 386 for short; a 486 would be even better), a load of patience
  58.   and a sense of humor. This last is almost essencial, because I don't receive
  59.   any money for doing this, so I must have fun doing it. I will also take for
  60.   certain you have the 9th grade (or equivelent).
  61.  
  62.     As I stated above, this magazine will be made especially for those who don't
  63.   know where to get information, or want it all in the same place, and to those
  64.   who want to learn how to program, so I'll try to build knowledge, building up
  65.   your skills issue by issue. If you sometimes fail to grasp some concept, don't
  66.   despair; try to work it out.
  67.     That's what I did... Almost everything I know was learnt from painfull
  68.   experience. If you re-re-re-read the article, and still can't understand it,
  69.   just drop me a line, or just plain forget it. Most of the things I try to
  70.   teach here aren't linked to each other (unless I say so), so if you don't
  71.   understand something, skip it and go back to it some weeks later. It should
  72.   be clearer for you then. Likewise, if you see any terms or words you don't
  73.   understand, follow the same measures as before.
  74.  
  75.     Ok, as I'm earing the Net gurus and other god-like creatures talking
  76.   already, I'm just going to explain why I use Pascal.
  77.   For starters, Pascal is a very good language, ideal for the beginner, like 
  78.   BASIC (yech!), but it's powerfull enough to make top-notch programms.
  79.   Also, I'll will be using assembly language in later issues, and Pascal makes
  80.   it so EASY to use. 
  81.   Finally, if you don't like my choice of language, you can stop whining. The
  82.   teory behind each article is very simple, and common with any of the main
  83.   languages (C, C++, Assembly - Yes, that's true... BASIC isn't a decent
  84.   language).
  85.  
  86.     Just one last thing... The final part of the magazine is a little story
  87.   made up by my distorted mind. It's just a little humor I like to write, and
  88.   it hasn't got nothing to do with programming (well, it has a little), but, 
  89.   as I said before, I just like to write it.
  90.  
  91.   ■ About the author
  92.  
  93.     Ok, so I'm a little egocentric, but tell me... If you had the trouble of 
  94.   writing hundreds of lines, wouldn't you like someone to know you, even by 
  95.   name ?
  96.  
  97.     My name is Diogo de Andrade, alias Spellcaster, and I'm the creator, 
  98.   editor and writer of this magazine. 
  99.   I live in a small town called Setúbal, just near Lisbon, the capital of
  100.   Portugal... If you don't know where it is, get an encyclopedia, and look for
  101.   Europe. Then, look for Spain. Next to it, there's Portugal, and Setúbal is in
  102.   the middle.
  103.  
  104.     I'm 18 years old, and I just made it in to the university (if you do want
  105.   to know, I'm in the Technical Institute of Lisbon, Portugal), so I'm not 
  106.   a God-Like creature, with dozens of years of practice (I only program by 
  107.   eight years now), with a mega-computer (I own a 386SX, 16 Mhz), that wear
  108.   glasses with lens that look like the bottom of a bottle (I use glasses, but
  109.   only sometimes), that has his head bigger than a pumpkin (I have a normal
  110.   sized head) and with an IQ of over 220 (mine is actually like 180).
  111.     I can program in C, C++, Pascal, Assembly and even BASIC (yech!).
  112.  
  113.     So, if I am a normal person, why do I spend time writing this ?
  114.   Well, because I have the insane urge to write thousands of words every now
  115.   and then, and while I'm at it, I may do something productive, like teaching
  116.   someone. I may be young, but I know a lot about computers (how humble I am;
  117.   I know, modesty isn't one of my qualities).
  118.  
  119.     Just one more thing, if you ever program anything, please send to me... I
  120.   would love to see some work you got, maybe I even could learn something with
  121.   it. Also, give me a greet in your program/game/demo... I love seeing my 
  122.   name.
  123.  
  124.   ■ Distribution
  125.  
  126.     I don't really know when can I do another issue, so, there isn't a fixed
  127.   space of time between two issues. General rule, I will try to do one every two
  128.   weeks, maybe more or maybe less.
  129.     'The Mag' is available by the following means:
  130.  
  131.     - Snail Mail : My address is below, in the Contributions seccion... Just
  132.                    send me a disk and tell me what issues you want, and I
  133.                    will send you them...
  134.  
  135.     - E-Mail : If you E-mail me and ask me for some issues, I will Email you
  136.                back with the relevant issues attached.
  137.  
  138.     - BBS's : I don't know for sure what BBS's have or will have my magazine,
  139.               but I will try to post it in the Skyship BBS.
  140.               If you have a BBS and you want to receive 'The Mag', contact me.
  141.  
  142.                  Skyship BBS numbers: (351)+01-3158088
  143.                                       (351)+01-3151435
  144.  
  145.     By the end of this year (1995), I should have an Internet Page, and some
  146.   more BBS's in my list, besides some ftp's.
  147.  
  148.   ■ Contributions
  149.  
  150.     I as I stated before, I'm not a God... I do make mistakes, and I don't 
  151.   have (always) the best way of doing things. So, if you think you've spotted
  152.   an error, or you have thought of a better way of doing things, let me know.
  153.   I'll be happy to receive anything, even if it is just mail saying 'Keep it 
  154.   up'. As all human beings, I need incentive.
  155.  
  156.     Also, if you do like to write, please do... Send in articles, they will be
  157.   welcome, and you will have the chance to see your names up in lights. 
  158.  
  159.     If anyone out there has a question or wants to see an article about 
  160.   something in particular, feel free to write... All letters will be answered,
  161.   provided you give me your address.
  162.  
  163.     Also, I'm looking for people to create a new demo/game/utilities group, and
  164.   I need all sort of people, from coders (sometimes, one isn't enough), 
  165.   musicians (I can compose, but I'm a bit limited), graphics artists (I can't 
  166.   draw nothing) and spreaders... I mean, by a spreader, someone who spreads 
  167.   things, like this mag. If you have a BBS and you want it to include this 
  168.   magazine (or anything that I make), feel free to write me...
  169.  
  170.     You can also contact me personally, if study on the IST (if you don't
  171.   know what the IST is, you don't study there). I'm the freshman with the 
  172.   black hair and dark-brown eyes... Yes, the not-so-tall but pretty one (there 
  173.   goes my modesty again). I recommend you to contact me personally, if you can, 
  174.   especially if you are a member of the opposite sex (I'm a man, for those of 
  175.   you who are wondering).
  176.  
  177.     My adress is:
  178.                  Praceta Carlos Manito Torres, nº4/6ºC
  179.                  2900 Setúbal
  180.                  Portugal
  181.  
  182.     Email: dgan@rnl.ist.utl.pt
  183.  
  184.  
  185.   ■ Hellos and greets
  186.  
  187.     I'll say hellos and thanks to all my friend, especially for those who put 
  188.   up with my constant whining (you know who you are).
  189.     Special greets go to Denthor from Asphyxia (for the excelent VGA trainers),
  190.   Draeden from VLA (for assembly tutorials), Joaquim Elder Guerreiro, alias
  191.   Dr.Shadow (Delta Team is still up), Alex "Darkfox" (thanks for letting me
  192.   use your BBS), Joäo Neves and Henrique Craveiro for sugestions, and all the
  193.   demo groups out there.
  194.     I also want to say hi to my idols (I know they don't read this, but...),
  195.   Chris Roberts, François Lionet, Archer MacLean, everybody at ID Software and
  196.   Apogee, Sierra On-Line, Lucas Arts and Team 17, for showing me what 
  197.   programming is all about.
  198.  
  199.  
  200.  
  201.  
  202. ■ Hexadecimal and binary - The untold story
  203.  
  204.     This article is about hexadecimal and binary. This is a purely teorical
  205.   article, so, if you know everything about them, go on to the next part.
  206.   
  207.   ■ What are they ?
  208.  
  209.     Hexadecimal (Hex for short) and binary are diferent numbering sistems. An 
  210.   more common example of a numbering sistem is the decimal sistem, that we use
  211.   everyday. The teory behind decimal is that there are 10 digits, starting from
  212.   0 up to 9. If you join the digits together, you will get the numbers. This is
  213.   called a base 10 sistem. The hexadecimal sistem is a base 16 sistem. This 
  214.   means you have the digits from 0 to 9, but after 9 you still have A, B, C, 
  215.   D, E and F. Don't worry if this sound a little weird. It will be a lot 
  216.   simpler when you look at the next chart. The first column is the number in
  217.   decimal, the other one is the hexadecimal correspondent.
  218.  
  219.          ┌─────────────┬──────────────┐  ┌─────────────┬──────────────┐
  220.          │   DECIMAL   │      HEX     │  │   DECIMAL   │      HEX     │
  221.          ├─────────────┼──────────────┤  ├─────────────┼──────────────┤       
  222.          │      0      │       0      │  │     16      │      10      │
  223.          │      1      │       1      │  │     17      │      11      │
  224.          │      2      │       2      │  │     18      │      12      │
  225.          │      3      │       3      │  │     19      │      13      │
  226.          │      4      │       4      │  │     20      │      14      │
  227.          │      5      │       5      │  │     21      │      15      │
  228.          │      6      │       6      │  │     30      │      1F      │
  229.          │      7      │       7      │  │     31      │      20      │
  230.          │      8      │       8      │  │     40      │      28      │
  231.          │      9      │       9      │  │     50      │      32      │
  232.          │     10      │       A      │  │     60      │      3C      │
  233.          │     11      │       B      │  │     70      │      46      │
  234.          │     12      │       C      │  │     80      │      50      │
  235.          │     13      │       D      │  │    100      │      64      │
  236.          │     14      │       E      │  │    200      │      C8      │
  237.          │     15      │       F      │  │    255      │      FF      │
  238.          └─────────────┴──────────────┘  └─────────────┴──────────────┘
  239.  
  240.     Do you understand it now ? I'll teach you how to convert from one base to
  241.   another in a second. Another thing you must know, is that that hexadecimal
  242.   number is almost everytime acompained with the '$' simbol or with the letter
  243.   'h' in the end of it. So, $10 is the same that 10h, and it means 16 in 
  244.   decimal.
  245.  
  246.     But how do you convert from a base to another, I hear you cry. It's easier
  247.   explain with an example.
  248.     Let's convert the number 255 decimal to hexadecimal (I know by experience
  249.   that 255 decimal is FFh or $FF).
  250.                                             You divide the 255 by 16. Then, 
  251.                         255   │ 16          you convert the quocient to 
  252.                          15   └─────        hexadecimal (in this case it equals
  253.                                 15          F ) and then convert the reminder
  254.                                             (again it's F). So you finish with
  255.                                             $FF. Let's try again...
  256.  
  257.     Convert the number 654 to hex... This time it's more tricky, but try for 
  258.   yourself, then check the result.
  259.  
  260.                 654  │ 16
  261.      14 = Eh <-- 14  └─────┐
  262.                        40  │ 16            So, 654 = 28Eh
  263.                         8  └─────
  264.                              2
  265.  
  266.  
  267.      Now, let's try to do the opposite, that is, convert from hexadecimal to  
  268.    decimal. This is easier to do. All you have to do is to know the powers of
  269.    16. Let's convert FFh to decimal (you already should know this is equal to
  270.    255).
  271.  
  272.                 FF = 15 * 16 + 15 = 255 ; Probably, you didn't understood it,
  273.                                           so I'll explain it better.
  274.  
  275.         16^3    16^2    16^1    16^0    ; These are the powers of 16.            
  276.         4096     256     16       1     
  277.  
  278.           0       0       F       F     ; this is the number we want to convert
  279.                                           00FFh = FFh
  280.                                           Now, we multiply the second F (counting
  281.                                           from the right) by 16.
  282.                                           F*16 = 15*16 = 240; and then you add the
  283.                                           other F; 240+F = 240+15 =255.
  284.  
  285.     See, how it was easy ?! Let's try with another number...
  286.   Let's convert 28Eh to decimal.
  287.  
  288.         16^3    16^2    16^1    16^0
  289.         4096     256     16       1
  290.  
  291.           0       2       8       E
  292.  
  293.     So, we get: 256*2 + 8*16 + E = 512 + 128 + 14 = 654 !!!
  294.   I know this sound complicated for a begginner, but it will all sound clearer
  295.   in time. Don't be scared by it... Don't let it prevent you from making 
  296.   programming masterpieces. Some of these things aren't usefull, for now, but 
  297.   they'll proove invaluable in the future, so I decided that it would be better
  298.   if you learned it now.
  299.  
  300.     So, the article's about hexadecimal and BINARY... So, let's talk binary for
  301.   now. Has you probably has guessed, binary is another numbering sistem, this
  302.   time a base 2 sistem... Yep, that's right a sistem that only has two digits,
  303.   the 0 and the 1. So, let's do another table...
  304.  
  305.          ┌─────────────┬──────────────┐  ┌─────────────┬──────────────┐
  306.          │   DECIMAL   │    BINARY    │  │   DECIMAL   │    BINARY    │
  307.          ├─────────────┼──────────────┤  ├─────────────┼──────────────┤       
  308.          │      0      │   00000000   │  │     16      │   00010000   │
  309.          │      1      │   00000001   │  │     17      │   00010001   │
  310.          │      2      │   00000010   │  │     18      │   00010010   │
  311.          │      3      │   00000011   │  │     19      │   00010011   │
  312.          │      4      │   00000100   │  │     20      │   00010100   │
  313.          │      5      │   00000101   │  │     21      │   00010101   │
  314.          │      6      │   00000110   │  │     30      │   00011110   │
  315.          │      7      │   00000111   │  │     31      │   00011111   │
  316.          │      8      │   00001000   │  │     40      │   00101000   │
  317.          │      9      │   00001001   │  │     50      │   00110010   │
  318.          │     10      │   00001010   │  │     60      │   00111100   │
  319.          │     11      │   00001011   │  │     70      │   01000110   │
  320.          │     12      │   00001100   │  │     80      │   01010000   │
  321.          │     13      │   00001101   │  │    100      │   01100100   │
  322.          │     14      │   00001110   │  │    200      │   11001000   │
  323.          │     15      │   00001111   │  │    255      │   11111111   │
  324.          └─────────────┴──────────────┘  └─────────────┴──────────────┘
  325.  
  326.     So, this is fairly simple, isn't it ?!
  327.   Let's do some conversion... This is just like the decimal to hexadecimal
  328.   conversion, but you divide by two...
  329.  
  330.                         255 │ 2
  331.                           1 └────┐
  332.                              127 │ 2
  333.                                1 └────┐
  334.                                    63 │ 2
  335.                                     1 └────┐
  336.                                         31 │ 2
  337.        So, 255 = 11111111b               1 └────┐
  338.                          |                   15 │ 2
  339.                         \|/                   1 └────┐
  340.                          This is the              7  │ 2
  341.                      same as the 'h' in           1  └────┐
  342.                      hexadecimal...                    3  │ 2
  343.                                                        1  └────
  344.                                                             1
  345.  
  346.     See, how easy this is... And converting from binary to decimal is as
  347.   easy as PI = 3.141592654. In this case, you must know the powers of two.
  348.  
  349.  
  350.        2^7  2^6  2^5  2^4  2^3  2^2  2^1  2^0
  351.        128   64   32   16   8    4    2    1
  352.  
  353.         1    1    1    1    1    1    1    1
  354.  
  355.        128 + 64 + 32 + 16 + 8 +  4 +  2 +  1 = 255 
  356.  
  357.     So, we come to the breath-taking conclusion that 255 = 11111111b...
  358.   Can you believe it ? Another example: converting 10010001b.
  359.  
  360.        2^7  2^6  2^5  2^4  2^3  2^2  2^1  2^0
  361.        128   64   32   16   8    4    2    1
  362.  
  363.         1    0    0    1    0    0    0    1
  364.  
  365.         128      +     16        +         1 = 145
  366.     
  367.     You have now taken the first steps into a larger world... The cyber-world.
  368.   You know what hexadecimal and binary are... I'll let it to you to discover 
  369.   how to convert from hexadecimal to binary and vice-versa... It's also 
  370.   easy... Trust me on this.
  371.  
  372.     To those super-programmers how were reading this just to know the untold
  373.   story of hexadecimal and binary, you are in for a surprise... There isn't 
  374.   an untold story !!! That's all folks !...
  375.  
  376.  
  377.  
  378.  
  379. ■ Bits and bytes - Do they really bite ?
  380.  
  381.     No they don't, answering to the pending question. Let's delve into the
  382.   world of bits and bytes, and know all about their family.
  383.  
  384.   ■ What are they ?
  385.  
  386.     You must know something about computers, as you read this article.
  387.   Computers are very stupid... They can only understand something: 0's and
  388.   1's. You may be asking to yourselfs 'What is he talking about ?'.
  389.     For starters, the computer only operates with 0's and 1's (active and
  390.   desactive, on and off, true of false). In the dawn of computers, everything
  391.   was made by a neverending serie of 1's and 0's. This is known as a bit.
  392.   The bit is either 0 and 1 (sound's familiar with binary). The computer can
  393.   then perform a series of operations on them, but now, this is unimportant.
  394.   That's why the binary notation is very important in computers.
  395.   
  396.     As you may have guessed, the computer wouldn't be very usefull if it could
  397.   only manage 0's and 1's. So the byte was invented. The byte is a serie of 
  398.   bits join together (8 of them). As a byte has 8 bits, it can store values 
  399.   that go from 00000000b to 11111111b (that is, from 0 to 255). To make this 
  400.   clearer with this example:
  401.  
  402.     Imagine a switch:               ┌───┐ 
  403.                                     │   │ <-- this is a switch.
  404.                                     └───┘
  405.     Now, a any switch, it can be on or off:
  406.  
  407.                 ┌───┐                           ┌───┐
  408.                 │ 0 │<-- This switch is off     │ 1 │<-- This switch in on
  409.                 └───┘                           └───┘
  410.  
  411.     This is a bit... A byte is just a serie of 8 switches, some of them are on,
  412.   some of them are off. So:
  413.  
  414.              ┌───┐┌───┐┌───┐┌───┐┌───┐┌───┐┌───┐┌───┐
  415.              │ 0 ││ 1 ││ 0 ││ 1 ││ 1 ││ 0 ││ 0 ││ 1 │ -> This is a byte, that
  416.              └───┘└───┘└───┘└───┘└───┘└───┘└───┘└───┘    holds the number 89.  
  417.              
  418.     Ok, so now we know waht a bit and a byte are.
  419.  
  420.   ■ The relatives
  421.  
  422.     Like every unit, the bit and the byte have multiples.
  423.  
  424.     The middle brother of the byte family is the word. The word is equal to 
  425.   two bytes. So now, you can store numbers that range from 0 to 65535, 
  426.   because you have another byte to store things.
  427.  
  428.     The oldest brother is the Double Word, or Dword. As you probably guessed,
  429.   this is two words together, or four bytes. This gives you a very big number
  430.   to store... I think is from 0 to 4.294.967.295, give and take some.
  431.  
  432.     Next you have the father of byte, word and Dword: Mr.Kilobyte, or Kb for 
  433.   short. This is equal to 1024 bytes (not 1000 as the name sugests). This 
  434.   measure used to say the capacity of a disk or memory.
  435.  
  436.     But, even in the byte family there is the grandfather: Grandpa Megabyte, 
  437.   also known as Mb and Mo. Well this is equal to 1024 Kb, or 1.048.576 bytes.
  438.  
  439.     Finally, you have the grand-grandfather... He is called Gigabyte and he 
  440.   is very big... It has 1024 Mb, so that a whole lot of bytes...
  441.  
  442.     So, now you know all about the byte family, from the humble byte to the
  443.   mighty gigabyte. I know this sound a bit strange, but it will soon grow 
  444.   within you. As I said before, you musn't be desmotivated by it, because most
  445.   of these things will become part of your knowledge with time. It will become
  446.   like your second language (ok, like your third, if you are portuguese and
  447.   you know english). Soon you will be playing with them without trouble.
  448.  
  449.  
  450.  
  451.  
  452. ■ Introduction to Pascal
  453.  
  454.   ■ What is Pascal
  455.  
  456.     Technically, Pascal is a high-level programming language. Poetically, it
  457.   is the tool that makes dreams come true...
  458.     What Pascal really is is a translator. It converts 'sentences' that
  459.   ressemble a normal talking and writing language to binary codes the computer
  460.   can execute. This process is know as compiling.
  461.     It was invented in the seventies (I think) by a professor that wanted a
  462.   language that was easy to learn (as BASIC), yet powerfull.
  463.     You must be thinking what differs from Pascal and BASIC (by now, you must
  464.   have realised that I hate BASIC). Well, the difference is that BASIC is an
  465.   interpreter, while Pascal is a compiler. A interpreter functions like this:
  466.  
  467.   ┌─> Get untranslated command
  468.   │   Translate command
  469.   └── Execute translated command
  470.  
  471.     The compiler works like this:
  472.  
  473.       Translate all commands
  474.   ┌─> Get translated command
  475.   └── Execute translated command
  476.  
  477.     It doesn't take an Einstein to figure out that a compiler is faster than
  478.   a interpreter. There's all sort of little diferences beetween them, appart
  479.   from this, but they are all about restrictions. General rule is the
  480.   interpreter is more limited than a compiler. The interpreter is easier to
  481.   understand, that is true, but it's very limited all the same.
  482.  
  483.   ■ The IDE
  484.  
  485.     It's a bit weird for me teaching the fundamental about Pascal. There's 
  486.   so much to teach, and I don't know where to start. I'll start with the editor.
  487.   When you first startup Pascal, (by typing 'turbo' or something like it in
  488.   the DOS), you will get a blue window, with a white frame, with a series of 
  489.   menus in the toolbar above it. Don't worry if the window doesn't appear. Just
  490.   press ALT+F. The File menu will expand. Select then the New option, either
  491.   with the arrow keys and Return, or pressing the 'N' key.
  492.    You are now looking to the IDE... The Integrated Development Enviroment.
  493.   This is where you are going to write your future masterpieces. I'll teach
  494.   you how to do things as we progress throughout the magazine.
  495.  
  496.   ■ How to build a program in Pascal - Your first program
  497.  
  498.     Every program in Pascal must start with a phrase like:
  499.  
  500.                   PROGRAM myprogram(input,output);     or
  501.                   PROGRAM myprogram(output);     or
  502.                   PROGRAM myprogram(input);     or
  503.  
  504.     This isn't really necessary (with Pascal 6 and upwards), but it's good
  505.   programming practice to put it there. The word 'PROGRAM' is a keyword.
  506.   A keyword is a word that Pascal recognizes (if you use Pascal V7.0, it
  507.   will turn white, as opposing the rest of the yellow text). As I was
  508.   saying, 'PROGRAM' is a keyword that says to the compiler the name of the
  509.   program (in this cases, the name is myprogram), and what kind of program
  510.   it is. In the first case, the program is (input,output), that is, the
  511.   program receives and writes data. By data, I mean any kind of data, is it
  512.   key, joystick or mouse commands, images, sounds, etc... Data can be anything
  513.   at all you want. In the second case, the program only outputs, that is, it
  514.   only gives out data. In the third case, you have an unusual case, seldom
  515.   used. It is the input only program. That only receives data.
  516.     Also notice the semi-colon in the end of the 'phrase'. It is necessary you
  517.   write it. Almost every command in Pascal ends with a ';'. At first you will
  518.   probably forget to put it, but when you run a program (that is, when you
  519.   compile it), Pascal will warn about it and will not run the program. As I
  520.   teach you new commands, I will tell which ones don't need the semi-colon. If
  521.   I don't say nothing about it, assume the command needs it.
  522.     The next thing in the program is the keyword 'BEGIN'. This tells the
  523.   compiler that a block of instructions follows. There are 5 kinds of
  524.   instruction blocks, and I will talk about all of them, in time. For the
  525.   meanwhile, in this case, this 'BEGIN' tells us that the main program block
  526.   starts there. Notice: For every 'BEGIN', there's and 'END', that is, the
  527.   last line in your program should be 'END.'. Also notice that the 'BEGIN'
  528.   keyword is never followed by a semi-colon, while the 'END' does, except if
  529.   it is the end of the program, in which case it is followed by a dot.
  530.     Let's see an example:
  531.  
  532.     Program Do_Nothing;           { you can omit the (input,output) }
  533.  
  534.     Begin
  535.     End.
  536.  
  537.     This program would compile, but it wouldn't do nothing.
  538.     Another thing to know about a Pascal program is that the compiler ignores
  539.   anything that is enclosed by '{' and '}'. So, you can write comments on the
  540.   program, just make sure you open and close the brackets.
  541.     Ok, let's make a program that actually makes something...
  542.  
  543.     Program Hello(output);            { This is the title of the program, }
  544.                                       { that only outputs... }
  545.     Begin                             { Begining the main block }
  546.          Writeln('Hello everybody');  { Writes 'Hello everybody' in the screen}
  547.          Readln;                      { Waits for RETURN to be pressed }
  548.     End.                              { Ends the main block and exits program}
  549.  
  550.     Type in this code (another name for the program) and run it. To run the
  551.   program, press ALT+R. The Run menu will pop up. Press 'R' now, and the program
  552.   will compile. Then it will write in the screen 'Hello everybody'. Then it will
  553.   wait for you to press RETURN and it will return to the IDE. Another way to
  554.   run the program is to press CTRL+F9.
  555.     About the 'WRITELN' and 'READLN' keywords, I will refer to them later on.
  556.     Now, let's save your program. Go to the File menu (ALT+F) and then press
  557.   'S'. A file browser will appear. Write the filename of your program (something
  558.   like 'HELLO') and press RETURN. The program will be saved. If you didn't
  559.   specified the extension, Pascal will assume '.PAS'. I recommend you to make
  560.   a directory to hold your Pascal programs, so you always know were they are.
  561.  
  562.     I know you must be thinking: 'Ow ! Big deal, I made a sentence appear in
  563.   the screen'. I know this isn't impressive, but it's a beginning. At first
  564.   this is off-putting, but as you progress you will see better results.
  565.  
  566.     I tought I'd stop for now, but I hear you cry: 'More! We want more!'. So
  567.   here it goes...
  568.  
  569.   ■ Variables
  570.  
  571.     This is one of the more important things in programming, so pay attencion.
  572.   A variable is a place where you can store data of various types.
  573.     A variable (also called a var) in Pascal must be defined before the
  574.   beginning of the main block of your program. Here's a list of some of the
  575.   types of variables there exists, alongside with their description.
  576.  
  577.   ┌───────────────────┬────────────────────────────────────────────────────┐
  578.   │       Type        │                    Description                     │
  579.   ├───────────────────┼────────────────────────────────────────────────────┤
  580.   │Shortint           │A signed integer number (a number that can be       │
  581.   │                   │positive and negative) that ranges from -128 to 127 │
  582.   │                   │                                                    │
  583.   │Integer            │A signed integer number that ranges from -32768 to  │
  584.   │                   │32767                                               │
  585.   │                   │                                                    │
  586.   │Longint            │A signed integer number that ranges from -2147483648│
  587.   │                   │to 2147483647 (very big!)                           │
  588.   │                   │                                                    │
  589.   │Byte               │An unsigned integer number that ranges from 0 to 255│
  590.   │                   │                                                    │
  591.   │Word               │An unsigned integer number that ranges from 0 to    │
  592.   │                   │65535 (sounds familiar ?!)                          │
  593.   │                   │                                                    │
  594.   │Char               │A simple character... Think of it as a letter...    │
  595.   │                   │                                                    │
  596.   │String             │A collection of Char's... It's like a sentence.     │
  597.   └───────────────────┴────────────────────────────────────────────────────┘
  598.  
  599.     These are only some of the types of vars that exist in Pascal... There
  600.   are many others and you can even define new ones, but that's something I'll
  601.   talk about in many issues from now...
  602.  
  603.     You are probably wondering what the hell is that all about... Let me
  604.   demonstrate with a series of example programs... They are all commented, so
  605.   you will probably understand them.
  606.  
  607.   Program Test_1;     { This starts the program Test_1 }
  608.                       { This program shows you how to give define and give }
  609.                       { values to variables }
  610.  
  611.   Var A:Integer;      { This defines a var of type Integer and calls it A }
  612.       B:Word;         { This defines a var of type Word and calls it B }
  613.       C:Char;         { This defines a var of type Char and calls it C }
  614.       D:String;       { This defines a var of type String and calls it D }
  615.  
  616.   Begin
  617.        A:=0;          { This gives var A the value 0 }
  618.        B:=50;         { This gives var B the value 50 }
  619.        C:='B'         { This stores in var C the letter B }
  620.        D:='Hello'     { This stores in var D the word 'Hello' }
  621.        Writeln(A);    { This writes to the screen the content of var A }
  622.        Writeln(B);    { This writes to the screen the content of var B }
  623.        Writeln(C);    { This writes to the screen the content of var C }
  624.        Writeln(D);    { This writes to the screen the content of var D }
  625.        Readln;        { This waits for RETURN to be pressed }
  626.   End.                { This ends the program }
  627.  
  628.  
  629.  
  630.   Program Test_2;       { This starts the program Test_2 }
  631.                         { This program shows you how to do some operations with}
  632.                         { variables }
  633.  
  634.   Var Num1:integer;     { This defines a var of type Integer and calls it Num1 }
  635.       Num2:Word;        { This defines a var of type Word and calls it Num2 }
  636.       Word1:String;     { This defines a var of type String and calls it Word1 }
  637.       Word2:String;     { This defines a var of type String and calls it Word2 }
  638.  
  639.   Begin
  640.        Num1:=15;        { This gives var Num1 the value 15 }
  641.        Num2:=50;        { This gives var Num2 the value 50 }
  642.        Word1:='Hello';  { This stores in var Word1 the word 'Hello' }
  643.        Word2:='World';  { This stores in var Word2 the word 'World' }
  644.        Num1:=Num1+Num2; { This adds Num1 to Num2 and places the result in Num1 }
  645.        Word1:=Word1+Word2; { This adds Word1 to Word2 and places the result in }
  646.                            { Word1 }
  647.        Writeln(A);      { This writes to the screen the content of var A }
  648.        Writeln(B);      { This writes to the screen the content of var B }
  649.        Writeln(C);      { This writes to the screen the content of var C }
  650.        Writeln(D);      { This writes to the screen the content of var D }
  651.        Readln;          { This waits for RETURN to be pressed }
  652.   End.                  { This ends the program }
  653.  
  654.     Did you understand it ? It's quite easy when you get the hang of it. Play
  655.   with the programs and you'll see how it works.
  656.     You can execute all sort of operations with variables, and even include
  657.   more than one operation at a time. They are very flexible, but notice a few
  658.   things:
  659.  
  660.   - If you have a var of type Char and you give the value 'ALFA', this is the
  661.     same that giving that variable the value 'A', because the var is type Char,
  662.     that only handles one character.
  663.  
  664.   - When you want to give a value to a variable, you must include ':' after it.
  665.     If you don't, you will get an error message.
  666.  
  667.            A:=10; { This is ok }
  668.            A=10;  { this wouldn't compile }
  669.  
  670.   - You can specify the maximum number of characters a string can hold,
  671.     putting the maximum number of characters (chars for short) it can hold
  672.     in front of it, enclosed in square braquets.
  673.  
  674.            Var S:String[14]; { This defines the string S, with 14 chars }
  675.  
  676.     Then, when you write something like:
  677.  
  678.            S:='SPELLCASTER RULES'
  679.  
  680.     It would be 'clipped', that is, the variable S would get the value
  681.     'SPELLCASTER RU', that is only 14 chars long...
  682.  
  683.   - There's a limit of memory the Pascal reserves for variables, so you can't
  684.     define an infinite number of variables. This limit is for now of 64 Kb, but
  685.     don't worry about it by now, because you won't make variables that can ocupy
  686.     that space. So that you know, a var of type integer ocuppies 2 bytes ! So,
  687.     you can store 32768 integer vars in memory !
  688.  
  689.     Next there is examples of the operations you can do with ordinal type of
  690.   variables, which are Shortint, Integer, Longint, Byte and Word. I'll use
  691.   just words, but it's the same for all the ordinal types of variables.
  692.   This isn't a program... It's just some examples:
  693.  
  694.   Var A,B:Word;   { Defines variables A and B as Words }
  695.  
  696.   A:=10; B:=15;   { You can put multiple commands in one line, as long as they }
  697.                   { separeted by a semi-colon. }
  698.   A:=A*B;         { Multiplies A by B and stores result in A }
  699.   A:=A DIV B;     { Divides A by B and stores result in A }
  700.   A:=A+B;         { Adds A to B and stores result in A }
  701.   A:=A-B;         { Subtracts B from A and stores result in A }
  702.   B:=A MOD B;     { Divides A by B and stores the modulo in B }
  703.   A:=A+1;         { Adds one to A and stores result in A }
  704.   B:=A+42;        { Adds 42 to A and stores result in B }
  705.   B:=200-A;       { Subtracts A from 200 and stores result in B }
  706.   B:=A+B*2;       { Multiplies B by 2, adds that to A and stores result in B }
  707.  
  708.     I think this cover the main operations. Don't forget the following points:
  709.  
  710.   - The DIV operation gives the integer result of the division, that is, if
  711.     you divide 15 by 2, you will get 7. The decimal part is ignored.
  712.  
  713.   - The order in which operation are made are equal to the standart order in
  714.     normal maths, except that the computer calculates from right to left,
  715.     while normal maths do operations from left to right. The order can be
  716.     altered by using parentesis. So:
  717.  
  718.     A:=A+B*2;     { Multiplies B by 2, adds that to A and stores result in A }
  719.     A:=(A+B)*2;   { Adds A to B, multiplies that by 2 and stores result in A }
  720.  
  721.  
  722.     Now, let's cover the string maths... this is quite unusual, because, normaly
  723.   you can only add numbers. Though it's strange, it's simple, as there is only
  724.   one operation (by now)...
  725.  
  726.   Var A,B:String;    { Defines A and B as strings }
  727.  
  728.   A:='Spell';      { Gives A the value 'Spell' }
  729.   B:='caster';     { Gives B the value 'caster' }
  730.  
  731.   A:=A+B;       { Adds A to B and stores result in A; A='Spellcaster' }
  732.   A:=A+' Rules';{ Adds A to ' Rules' and stores result in A, }
  733.                 { so A='Spellcaster Rules' }
  734.  
  735.  
  736.     Simple isn't it ? Keep practicing and you'll reach perfection. This is quite
  737.   easy, but, for a beginner it can be complicated, because it's a new concept.
  738.  
  739.   ■ The WRITELN and READLN keywords
  740.  
  741.     These are one of the more helpfull commands for beginners. Basically, what
  742.   they do is Write and Read... Tough, isn't it ?!
  743.  
  744.     Ok, let's examine WRITELN keyword.
  745.     It's sintax (sintax is how you call the command) is:
  746.  
  747.          WRITELN (what to write);
  748.  
  749.     The 'what to write' in parentesis is just that... It's what you want to
  750.   write. It can be almost anything you want. If you don't write nothing, he
  751.   just skips a line. Let's go to an example:
  752.  
  753.   Program Test_3                { Defines program Test_3 }
  754.  
  755.   Var A:String;                 { Defines variable A as a string }
  756.       B:Word;                   { Defines variable B as a word }
  757.  
  758.   Begin                         { Begins the main block }
  759.        A:='Spellcaster';        { Gives var A the value 'Spellcaster' }
  760.        B:=1995;                 { Gives var B the value 1995 }
  761.        Writeln(A);              { Writes the content of variable A }
  762.        Writeln(B);              { Writes the content of variable B }
  763.        Writeln('We are in ',B); { Writes 'We are in ', followed by var B }
  764.        Readln;                  { Waits for RETURN to be pressed }
  765.   End.                          { Ends the program }
  766.  
  767.     Now, try and change the WRITELN's in the program for WRITE's only (yes,
  768.   that's right... No LN ! ). If you do this, you will notice that the word
  769.   'Spellcaster' will appear followed imediattly by the number 1995. The
  770.   diference between WRITELN and WRITE is that WRITELN changes line after
  771.   writing.
  772.     WRITELN can also be used to write to the printer, but I'll save that for
  773.   a future issue.
  774.  
  775.     Say kids, what time is it ?
  776.     It's time to move on to READLN.
  777.  
  778.     We have just seen one of the uses of READLN in previous programs. It can be
  779.   used to wait for a person to press RETURN, but that's just the tip of the
  780.   iceberg... As you may have noticed (if you executed the above shown programs)
  781.   is that if you press any key besides RETURN, while the program is waiting, is
  782.   that the text you type in appears on the screen. This is a very usefull thing
  783.   and I'm going to show you why:
  784.  
  785.   Program Test_4;           { This starts program Test_4 }
  786.  
  787.   Var A:String;             { Defines a string called A }
  788.  
  789.   Begin                     { Starts main block }
  790.        A:='Spellcaster';    { Gives var A the value 'Spellcaster' }
  791.        Writeln(A);          { Writes the content of var A on the screen }
  792.        Readln(A);           { Reads a new value for variable A... }
  793.        Writeln(A);          { ...and writes it in the screen. }
  794.        Readln;              { Waits for RETURN to be pressed }
  795.   End.                      { Ends program }
  796.  
  797.     See why READLN is so usefull ?! It gives you the hability to read the
  798.   value of a variable from the keyboard.
  799.     So, now you know somethings to keep you entertained until the next issue.
  800.   Play with the programs, try to understand it and, especially, try to do a
  801.   program alone... You can do it with some patience. It's not that hard...
  802.     I will leave this section with one last program. I won't do what it does, so
  803.   you'll have to type it in. The only thing I say is that this program uses a
  804.   lot of the things we talked today. I won't comment it on purpose, to make you
  805.   read it to understand it.
  806.  
  807.   Program Maths(Input,Output);
  808.  
  809.   Var A,B:Integer;
  810.       C:Integer;
  811.  
  812.   Begin
  813.        Writeln('The Maths Version 1.0');
  814.        writeln;
  815.        write('Type in number A : ');
  816.        readln(A);
  817.        write('Type in number B : ');
  818.        readln(B);
  819.        C:=A+B;
  820.        Writeln('A+B=',C);
  821.        C:=A-B;
  822.        Writeln('A-B=',C);
  823.        C:=A*B;
  824.        Writeln('A*B=',C);
  825.        C:=A DIV B;
  826.        Writeln('A DIV B=',C);
  827.        C:=A MOD B;
  828.        Writeln('A MOD B=',C);
  829.        Readln;
  830.   End.
  831.  
  832.  
  833.  
  834. ■ Our friend, the pointer - Part I
  835.  
  836.     This article is aimed to those of you who already know some programming.
  837.   If you are a beginner, skip this article, get some more issues of 'THE MAG',
  838.   learn what you can with it, and then return to this issue.
  839.  
  840.   ■ What the hell is a pointer ?
  841.  
  842.     A pointer, as the name sugests is a type of variable that points to
  843.   something. That something it's usually a position in memory.
  844.  
  845.   ■ What's the use ?
  846.  
  847.     Imagine you want to create a array of some kind, let's say a 320 by
  848.   200 array of type byte. Normally you would do like
  849.   this:
  850.         Var A:Array[1..320,1..200] of byte;
  851.     If you would try to compile a program with a line like this, you would,
  852.   but you finished up beeing without space for the other variables in the
  853.   program, because, as you may know, Pascal has a 64Kb limit for variables.
  854.     What's the solution for this?  Pointers, of course !!!
  855.  
  856.    ■ How can I use the pointer ?
  857.  
  858.     There's three ways of using a pointer: two of them are dynamic (read by
  859.   that harder, because they don't have a fixed size) and one not-dynamic.
  860.   I'll teach you the not-dynamic one, because it's very easy. I'll save the
  861.   dynamic solution some issues away from now.
  862.      Normally, if Pascal had a bigger than 64Kb limit for variables, you could
  863.   a program like this (the dots are other code that doesn't matter):
  864.  
  865.   Program Test_5;
  866.  
  867.   Var A:Array[1..320,1..200] of byte;
  868.       B:Array[1..320,1..200] of byte;
  869.  
  870.   Begin
  871.        .......
  872.        .......
  873.        .......
  874.        .......
  875.        A[221,2]:=1;
  876.        B[300,43]:=2;
  877.        .......
  878.        Write(A[221,2]);
  879.        Write(B[300,43]);
  880.        .......
  881.        .......
  882.        .......
  883.   End.
  884.  
  885.     This wouldn't compile, because it excedes the 64Kb limit.
  886.     To do this in Pascal, with the 64Kb limit, you must do it like this:
  887.  
  888.   Program Test_5;
  889.  
  890.   Type C=Array[1..320,1..200] of byte;
  891.  
  892.   Var A:^C;
  893.       B:^C;
  894.  
  895.   Begin
  896.        Getmem(A,Sizeof(A^));
  897.        Getmem(B,Sizeof(B^));
  898.        .......
  899.        .......
  900.        .......
  901.        A^[221,2]:=1;
  902.        B^[300,43]:=2;
  903.        .......
  904.        Write(A^[221,2]);
  905.        Write(B^[300,43]);
  906.        .......
  907.        .......
  908.        .......
  909.        Freemem(A,Sizeof(A^));
  910.        Freemem(B,Sizeof(B^));
  911.   End.
  912.  
  913.     This second program would work because you would be spending base-memory
  914.   of the computer, and not the 64Kb Pascal has for variables.
  915.     Now, for the hard part: explaining how this works.
  916.     The TYPE clause in the start is necessary, because who need to point to
  917.   something when we define the A and B variables. You place there wherever you
  918.   want to allocate in base memory. The VAR clause says that vars A and B point
  919.   to an object with the structure of type C.
  920.     Then, you must allocate the memory for the pointer. So, you use the Getmem
  921.   keyword. The sintax for Getmem is:
  922.  
  923.                Getmem (pointer, size);
  924.  
  925.     So, you grab the memory you need. Then, as you are working with pointers,
  926.   instead of refering to the variables as A[10,10], you refer as A^[10,10].
  927.   Easy, isn't it ?... Next, in the end of the program (or when you want to free
  928.   the memory for another pointer or something like that), you use the Freemem
  929.   keyword. The sintax is:
  930.  
  931.                Freemem (pointer, size);
  932.  
  933.     You must de-allocate as much memory as you allocate, under the penalty of
  934.   losing that memory. The problem with working with pointers is that if you
  935.   don't de-allocate them, after a couple of program execution, you'll get an
  936.   'Out of Memory' error, because the memory is already filled with pointers.
  937.   So, never forget to de-allocate the pointers.
  938.     As you can see, this method of using pointers is very easy to use and
  939.   implement. The other methods (the dynamic ones) are ten times more
  940.   complicated, and in the majoraty of cases, this is better, especially for
  941.   games and demos, because everything in them is planned.
  942.     Keep one thing in mind, tough. Because of the way PC's work, you can not
  943.   allocate more than 64Kb to just one pointer. This has to do with
  944.   segmentation, but there are ways to turn this around.
  945.     One more thing, in the lines with Getmem and Freemem I use a function,
  946.   called sizeof, whose sintax is:
  947.  
  948.                  =sizeof(structure);
  949.  
  950.     This function returns the size in bytes of the structure in parentesis.
  951.  
  952.  
  953.  
  954. ■ Points of view
  955.  
  956.     Although this article is called Points of View, it has nothing to do with
  957.   oppinion. This is like the conclusion of the magazine. I just called that
  958.   because I will sometimes expose my distorted points of view here, and I didn't
  959.   wanted to call this 'Conclusion'... It would sound vulgar.
  960.  
  961.     So, what will I see here? I don't really know. After all, this is the first
  962.   issue. I don't have nothing to say. I'll wait until I read/hear some remarks
  963.   about 'The Mag', and then I'll write something, like a response or an
  964.   apologie request.
  965.  
  966.     As I talked about apologies, I will take the chance to ask one or two.
  967.   I apologize for the English in this magazine, but you must understand three
  968.   things:
  969.          1. I'm not English
  970.          2. It's bloody hard keeping a good thinking without worring about the
  971.             the grammar, left alone if I cared.
  972.          3. I write very fast (compared to the other persons), and at that speed
  973.             it's very hard not to make mistakes.
  974.   I also apologize about my language and the whole tone of the magazine. In this
  975.   case, you must notice I don't get any money for doing this, so I must do it
  976.   for fun.
  977.  
  978.     Well, there's only one thing left in my magazine...
  979.  
  980. ■ The adventures of Spellcaster, the rebel programmer of the year 2018.
  981.  
  982.   Episode 1 - The beggining
  983.  
  984.     I remember it all... From the day it started my trail of misery... And I
  985.   think I'll never forget it.
  986.   It was a friday night, the 26th September 2018. I was just trying to program
  987.   my new computer I got by my 18th birthday, just 23 days from then. It was a
  988.   top of line Octium, clocked at 33 Gigahertz, with 10 Gigabytes RAM, a hard
  989.   drive with 800 Gigabytes hard drive and a whole lot more stuff. Just what I
  990.   always wanted. As I said, I was programming my computer, a simple strategy
  991.   game in Pascal v18.2, when suddently, my computer ran dead. It wouldn't do
  992.   nothing. It just froze up. I tried rebooting it, then I turned the power off
  993.   and on, and nothing would happen. In panic, I rushed to the phone, and I
  994.   started dialing the number of COMPTEL, the largest manufacturer of computers,
  995.   programs and other assorted things. It also fixed computers. They said they
  996.   were on the way. I sat down, a bit more relaxed and started to think about
  997.   COMPTEL, from it's founding by some guy called Bill something to their
  998.   takeover of the world. I was disturbed from my toughts by a siren. I look
  999.   out the window, and there it was... A white van with the words 'COMPTEL'
  1000.   writen in red on the side. They knocked at my door. I opened the door, and
  1001.   two persons entered. They were exactly alike, quite tall, brown hair, glasses
  1002.   and bad breath. As I live in the age of clones, I wasn't surprised. I showed
  1003.   them the computer and they told me to leave. So I did. Minutes later, they
  1004.   called me. I entered my room, anxious. They weren't looking happy, but I
  1005.   didn't cared. All I cared was my computer. I looked at it, and the green
  1006.   letters the screen displayed just made my fears away.
  1007.   - Thank you very much... - I said, with a big smile.
  1008.   - Mr. Andrade... As we always do after a repair, we scan the disk for pirated
  1009.     software, subversive campaign against COMPTEL, that kind of things.
  1010.   - What do you mean ?... I don't have any of those.
  1011.   - Yes, that is true. - said the other man. - You have very little software
  1012.     instaled in your hard drive indeed.
  1013.   - But we've noticed a very serious fellony...
  1014.   - Can you tell us, Mr.Andrade, why isn't Windows 2018 installed ?
  1015.   - Because I don't have any use for it... I am a programmer, not a user. I
  1016.     pratically I only use MY-DOS, v6.0. - I answered, my heart going faster.
  1017.   - How can you program without Windows ? - one of them asked, angry.
  1018.   - Without Visual Basic ? - asked the other, with a yellow smile.
  1019.   - Yes... - I answeared, nervously. - I use Turbo Pascal... With assembler.
  1020.   - Do you know article 52421/52 of COMPTEL law, Mr.Andrade ?
  1021.   - N-n-n-no I don't. - I began to sweat.
  1022.   - The article states that no operating sistem besides Windows 2018 can be
  1023.     used... The article also says that no programming language, other than
  1024.     Visual Basic, can be used.
  1025.   - But...but... I'm a programmer. Windows and Visual Basic aren't made for
  1026.     programmers...
  1027.   - Tough luck... - said one of the COMPTEL men, as a third man grabed me from
  1028.     behind, dragging me to the van, while my parents looked as I was beeing
  1029.     taken away.
  1030.   A week after, I was in court, before The Judge himself... Bill Gates Jr.
  1031.   - How do you plea to this charges ?
  1032.   - Not guilty, sir...
  1033.   - Ha, ha, ha !!! - the whole room laughed, as The Judge hitted the table with
  1034.     his hammer.
  1035.   - Diogo de Andrade, I found you guilty of violating the article 52421/52,
  1036.     usage of illegal software. The sentence will be 30 years incarceration,
  1037.     with no possibility of parole. The sentence will be carried out in the
  1038.     Atari World Penetenciary...
  1039.   - No, no... - I screamed. - Everything but the Atari Penetenciary.
  1040.   The judge laughed at my plea, and ignored it.
  1041.     Now, these walls is all I have left. I am here at almost a month now, with
  1042.   no computers to program, except for Ataris... Cruel faith is mine. Beeing
  1043.   doomed to 30 years of this suffering. Unless, of course, I can escape...
  1044.  
  1045.  
  1046.  
  1047.                                          See you in the next issue
  1048.                                         Diogo "SpellCaster" Andrade
  1049.